﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using Systematize.Domain.Entities;

namespace Systematize.Domain.Data
{
    public interface IRepository<T>
        where T : Entity
    {
        int Count();

        int Count(Expression<Func<T, bool>> predicate);

        IEnumerable<T> GetAll();

        T Find(Expression<Func<T, bool>> predicate);

        IEnumerable<T> FindAll(Expression<Func<T, bool>> predicate);

        void Insert(T entity);

        void Update(T entity);

        void Delete(T entity);
    }
}
